#include "ThreadPool.cpp"
#include <iostream>
ThreadPool pool(4);

void sayHello(void *){
	std::cout<<"hello world!"<<endl;
}

void doFuc(void (*f)()){
	f();
}
int main(int argc,char** argv){
	//pool.Call(sayHello);
	//pool.Call([](void *){std::cout<<"lambda"<<endl;});
	doFuc([](){std::cout<<"lambda"<<endl;});

	std::vector<int> some_list;
	int total = 0;
	for (int i=0;i<5;++i) some_list.push_back(i);
	std::for_each(begin(some_list), end(some_list), [&total](int x) 
	{
		total += x;
	});
	std::cout<<"total="<<total<<endl;
	std::system("pause");
	return 0;
}
